<?php
namespace app\admin\validate;

use think\Validate;

class Admin extends Validate
{
    protected $rule = [
        'username' => 'require|unique:admin',
    ];
    protected $message = [
        'username.require' => '必须设置账号',
        'username.unique'  => '账号已经存在',
    ];
    protected $scene = [
        'edit' => [
            'username',
        ],
    ];
}
